package me.keiwu.admin.domain.system;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import lombok.EqualsAndHashCode;
import me.keiwu.admin.domain.AbstractBaseEntity;
import org.hibernate.annotations.BatchSize;
import org.hibernate.annotations.ColumnDefault;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.ManyToMany;
import javax.validation.constraints.Size;
import java.util.HashSet;
import java.util.Set;

/**
 * Created by kei on 31/10/2017.
 */
@Entity
@Data
@EqualsAndHashCode(callSuper = false)
public class SysInviteCode extends AbstractBaseEntity {

    @Id
    @Size(max = 10)
    @Column(length = 10)
    private String code;

    @ColumnDefault(value = "1")
    @Column(nullable = false, columnDefinition = "TINYINT", length = 1)
    private boolean isValid;

    private Integer type;

}
